import React, { Component } from 'react'
import UEditor from 'COMPONENT/UEditor/UEditor'
// import './ueditor.less'

export default class App extends Component {
  constructor(props) {
    super(props)
    this.state = {
      value: ''
    }
  }
  handleChange(val) {
    this.setState({
      value: val
    })
  }
  componentDidMount() {
    this.setState({
      value: '<p>123</p>'
    })
  }
  render() {
    var { value } = this.state
    return <div className="tederen-ueditor">
      <UEditor ref="ue" id="ue" value={value} style={{height: 300}} onChange={this.handleChange.bind(this)}/>
      <button>确定</button>
      <div dangerouslySetInnerHTML={{__html: value}}></div>
    </div>
  }
}
